package com.ruoyi.wbgame.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbGamePublishMapper;
import com.ruoyi.wbgame.domain.WbGamePublish;
import com.ruoyi.wbgame.service.IWbGamePublishService;
import com.ruoyi.common.core.text.Convert;

/**
 * 游戏发布Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-16
 */
@Service
public class WbGamePublishServiceImpl implements IWbGamePublishService 
{
    @Autowired
    private WbGamePublishMapper wbGamePublishMapper;

    /**
     * 查询游戏发布
     * 
     * @param teacherId 游戏发布ID
     * @return 游戏发布
     */
    @Override
    public WbGamePublish selectWbGamePublishById(Long teacherId)
    {
        return wbGamePublishMapper.selectWbGamePublishById(teacherId);
    }

    /**
     * 查询游戏发布列表
     * 
     * @param wbGamePublish 游戏发布
     * @return 游戏发布
     */
    @Override
    public List<WbGamePublish> selectWbGamePublishList(WbGamePublish wbGamePublish)
    {
        return wbGamePublishMapper.selectWbGamePublishList(wbGamePublish);
    }

    /**
     * 新增游戏发布
     * 
     * @param wbGamePublish 游戏发布
     * @return 结果
     */
    @Override
    public int insertWbGamePublish(WbGamePublish wbGamePublish)
    {
        return wbGamePublishMapper.insertWbGamePublish(wbGamePublish);
    }

    /**
     * 修改游戏发布
     * 
     * @param wbGamePublish 游戏发布
     * @return 结果
     */
    @Override
    public int updateWbGamePublish(WbGamePublish wbGamePublish)
    {
        return wbGamePublishMapper.updateWbGamePublish(wbGamePublish);
    }

    /**
     * 删除游戏发布对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbGamePublishByIds(String ids)
    {
        return wbGamePublishMapper.deleteWbGamePublishByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除游戏发布信息
     * 
     * @param teacherId 游戏发布ID
     * @return 结果
     */
    @Override
    public int deleteWbGamePublishById(Long teacherId)
    {
        return wbGamePublishMapper.deleteWbGamePublishById(teacherId);
    }
}
